﻿using RabbitMQ.Client;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Curry.Forum.Command.Handler.Helper
{
    public class MqHelper
    {
        //TODO 放入配置文件
        private static readonly ConnectionFactory rabbitMqFactory = new ConnectionFactory()
        {
            HostName = "localhost",
            UserName = "guest",
            Password = "guest",
            Port = 5672
        };

        public IConnection GetConnection()
        {
            var conn = rabbitMqFactory.CreateConnection();
            return conn;
        }
    }
}
